//
//  HPLeftCell.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/6/19.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "HPLeftCell.h"

@implementation HPLeftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addSubview:self.timeLabel];
        [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@10);
            make.centerY.equalTo(self.mas_centerY);
            make.width.equalTo(@100);
            make.height.equalTo(@50);
        }];
        [self addSubview:self.detailLabel];
        [_detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@110);
            make.top.equalTo(self.mas_top);
            make.right.equalTo(@0);
            make.bottom.equalTo(self.mas_bottom);
        }];
    }
    return self;
}
- (UILabel *)timeLabel{
    if (!_timeLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = TITLECOLOR;
        label.numberOfLines = 2;
        _timeLabel = label;
    }
    return _timeLabel;
}
- (UILabel *)detailLabel{
    if (!_detailLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.font = [UIFont systemFontOfSize:12];
        label.textColor = SELECTEDCOLOR;
        label.numberOfLines = 0;
        _detailLabel = label;
    }
    return _detailLabel;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
